package com.zj.order.controller;

import com.zj.order.model.dto.OrderByUserDto;
import com.zj.order.service.IOrderService;
import com.zj.order.service.impl.OrderServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program cloud-demo
 * @description:
 * @author: zhangbo
 * @create: 2022/02/02 22:31
 */
@RestController
@RequestMapping("/order/")
public class OrderController {

    @Autowired
    private IOrderService orderService = new OrderServiceImpl();

    @GetMapping("query")
    public OrderByUserDto queryOrder(@RequestParam Long id){
        return orderService.queryOrderById(id);
    }
}
